import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import request from './utils/request'
import detailsFooter from '@/components/footer/detailsFooter'
Vue.component('ttFooter', detailsFooter)
Vue.prototype.$http = request;
Vue.config.productionTip = false

import '@/components/vant/index.js'//vant全局组件



// 混入
import mixin from '@/common/mixins';
Vue.mixin(mixin)

import init from '@/common/init.js'
import { Toast } from 'vant'

Vue.prototype.$Bus=new Vue()

const app =  new Vue({
  router,
  store,
  render: h => h(App)
})

init().then(res=>{
   app.$mount("#app")
}).catch(err=>{
  Toast("网络异常,请重试")
  app.$mount("#app")
})